<form id="defaultForm" method="post" class="form-horizontal" action=""
      data-bv-message="This value is not valid"
      data-bv-feedbackicons-valid="fa fa-check"
      data-bv-feedbackicons-invalid="fa fa-times"
      data-bv-feedbackicons-validating="fa fa-refresh" xmlns:th="http://www.thymeleaf.org">
      
       <div class="form-group col-md-12">
		<label class="col-md-3 control-label">原密码</label>
		<div class="col-md-9">
			<input type="text" class="form-control" id="old_psw" name="password" value="" placeholder="请输入原密码">
		</div>
		 <label class="col-md-12  "></label>
		<label class="col-md-3 control-label">新密码</label>
		<div class="col-md-9">
			<input type="text" class="form-control" id="new_psw1" name="newPassword" value="" placeholder="请输入新密码">
		</div>
		 <label class="col-md-12  "></label>
		<label class="col-md-3 control-label">重复新密码</label>
		<div class="col-md-9">
			<input type="text" class="form-control" id="new_psw2" name="newPassword1" value="" placeholder="请重复新密码">
		</div>
	</div>
</form>
<style>
.red {
	color: red;
}
</style>
<script>
	$(function() {
		/* 表单验证 */
		$('#defaultForm').bootstrapValidator();
	});

	//获取表单参数json字符串
	function getParams() {
		var data = [];
		var formData = JSON.formSerialize("defaultForm");
		data.push(formData);
		var text = JSON.stringify(data);
		return text;
	}
</script>